Reset Password API
POST /resetPassword
Description
This API endpoint allows users to reset their password using a token provided in the password reset email. The user must supply the reset token and their new desired password.
Request Body
The request utilizes GraphQL to perform the resetPassword
mutation.
Mutation:
mutation resetPassword ($token: String!, $password: String!) {
resetPassword (token: $token, password: $password)
}
Variables:
{
"token": "<Reset_Token>",
"password": "<New_Password>"
}
- token (String): The reset token that was sent to the user's email address.
- password (String): The new password that the user wishes to set for their account.
Response:
-
Success (200 OK):
- If the password reset is successful, no additional data is returned, and the user's password will be updated.
-
Error (4XX/5XX):
- Appropriate error messages and status codes will be returned in cases of invalid token, expired token, weak password, or server errors.